import { createRouter, createWebHashHistory } from 'vue-router'
import Index from '../views/Index.vue'

const routes = [
  {
    path: '/',
     redirect:'/index'
  },
  {
    path: '/index',
    name: 'Index',
    component: Index
  },
   {
    path: '/doctorList',
    name: 'DoctorList',
    component: () => import(/* webpackChunkName: "about" */ '../views/DoctorList.vue')
  },
  {
    path: '/doctorInfo/:id',
    name: 'DoctorInfo',
    component: () => import(/* webpackChunkName: "about" */ '../views/DoctorInfo.vue')
  },
  {
    path: '/messages/',
    name: 'Messages',
    component: () => import(/* webpackChunkName: "about" */ '../views/Messages.vue')
  },
  {
    path: '/home/',
    name: 'Home',
    component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue')
  },
  {
    path: '/login/',
    name: 'Login',
    component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
  },
  {
    path: '/message/:id',
    name: 'Message',
    component: () => import(/* webpackChunkName: "about" */ '../views/Message.vue')
  },
  {
    path: '/order/:id',
    name: 'Order',
    component: () => import(/* webpackChunkName: "about" */ '../views/OrderInfo.vue')
  },
  {
    path: '/case',
    name: 'Case',
    component: () => import(/* webpackChunkName: "about" */ '../views/Case.vue')
  },
  {
    path: '/aliPay',
    name: 'Pay',
    component: () => import(/* webpackChunkName: "about" */ '../views/Pay.vue')
  }







  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
